package com.css.zfzx.fxpg.modules.surveyspot.repository;

import com.css.zfzx.fxpg.modules.surveyspot.repository.entity.FxSurveySpotEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author leon
 * @date 2020-11-27
 */
public interface FxSurveySpotRepository extends JpaRepository<FxSurveySpotEntity, String> {

    /**
     * 查询所有调查点名称
     *
     * @return
     */
    @Query(nativeQuery = true, value = "select survey_spot_name from fx_survey_spot")
    List<String> findSurveySpotNames();
}
